var aFunctions = (function(){
    var num1 = 1;
    function toRight(){
        var curLeft = parseFloat(window.getComputedStyle(inner,null).left);
        var num = 0;
        
        if(curLeft == -json.jsonData.length*1000/2){
            inner.style.left = '0px';
            
        }
        
        tween.moveAllDeraction(inner,{
            left:parseFloat(window.getComputedStyle(inner,null).left)-1000
        },500);


        
        for(var i = 0;i < oliList.length;i++){
            if(oliList[i].className == 'active'){
                if(i==oliList.length-1){
                    num = 0;
                    oliList[num].className = 'active';
                    break;
                }
                oliList[i+1].className = 'active';
                num = i + 1;
                break;
            }


            
        }
        for(var i = 0;i < oliList.length;i++){
            if(i==num){
                continue;
            }
            oliList[i].className = '';

            
        }

        

    }

    function toLeft(){
        var curLeft = parseFloat(window.getComputedStyle(inner,null).left);
        var num = 0;
        
        if(curLeft == 0){
            inner.style.left = '-'+json.jsonData.length*1000/2+'px';
            
        }
        
        tween.moveAllDeraction(inner,{
            left:parseFloat(window.getComputedStyle(inner,null).left)+1000
        },500);


        
        for(var i = 0;i < oliList.length;i++){
            if(oliList[i].className == 'active'){
                if(i==0){
                    num = json.jsonData.length/2 - 1;
                    oliList[num].className = 'active';
                    break;
                }
                oliList[i-1].className = 'active';
                num = i - 1;
                break;
            }


            
        }
        for(var i = 0;i < oliList.length;i++){
            if(i==num){
                continue;
            }
            oliList[i].className = '';

            
        }

        

    }


    return {
        toRight:toRight,
        toLeft:toLeft
    }

})();